<template>
  <view class="image-title">
    <view class="box">
      <view class="title-car" v-if="!image"> </view>
      <image v-else :src="image" mode=""></image>
      <view class="name">{{ title }}</view>
	  <slot name="title"/>
	  
    </view>
    <slot></slot>
  </view>
</template>

<script>
export default {
  name: "XbdImageTitle",
  props: {
    title: "",
    image: "",
  },
};
</script>

<style lang="scss" scoped>
.image-title {
  margin-bottom: 30rpx;
  display: flex;
  justify-content: space-between;
  color: #000623;
  font-size: 32rpx;

  .box {
    display: flex;
    align-items: center;
    font-weight: 700;
    .title-car {
      height: 32rpx;
      width: 6rpx;
      background-color: #2e73fc;
      border-radius: 12rpx;
      margin-right: 20rpx;
    }
	.name{
		max-width: 600rpx;
		text-align: left;
		white-space: pre-line !important;
		word-break: break-all !important;
		word-wrap: break-word ;
	}
  }
  image {
    vertical-align: sub;
    width: 40rpx;
    height: 40rpx;
    margin-right: 20rpx;
  }
}
</style>
